package com.example.yoho.mvp.view.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.yoho.R;
import com.example.yoho.domain.Domain_Url;
import com.example.yoho.mvp.model.entity.ShoesBean;
import com.example.yoho.mvp.model.entity.ShowEntity;
import com.example.yoho.utils.MyGlide;

import org.w3c.dom.Text;

import java.util.List;

public class MyShowAdapter extends BaseQuickAdapter<ShowEntity.ValuesBean, BaseViewHolder> {
    public MyShowAdapter(int layoutResId, @Nullable List<ShowEntity.ValuesBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShowEntity.ValuesBean item) {
        ImageView smallImage=helper.getView(R.id.show_small_img);
        ImageView imageView_icon=helper.getView(R.id.show_icon);
        TextView textView_name=helper.getView(R.id.show_name);
        ImageView imageView_image=helper.getView(R.id.show_image);
        TextView textView_price=helper.getView(R.id.show_price);
        TextView textView_text=helper.getView(R.id.show_text);
        TextView textView_goods_price=helper.getView(R.id.show_goods_orice);
        textView_text.setText(item.getGoods_name());
        textView_price.setText("￥"+item.getGoods_discount_price());
        textView_name.setText(item.getDetail_flag());
        textView_goods_price.setText(item.getGoods_discount_price());
        MyGlide.GlideCirclye(mContext, Domain_Url.IMAGE_URL+item.getUser_head(),imageView_icon);
        MyGlide.GlideFor(mContext,Domain_Url.IMAGE_URL+item.getImg_path(),imageView_image);
        MyGlide.GlideFor(mContext,Domain_Url.IMAGE_URL+item.getGoods_img_path(),smallImage);
    }
}
